package com.fortune.dto.in.mTerminalDiscount;

import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.util.Date;

public class TerminalDiscountAddDto {
	@NotBlank(message="优惠政策名称不能为空")
	@ApiModelProperty(example="优惠政策名称")
	private String name;
	@NotBlank(message="商品id不能为空")
	@ApiModelProperty(example="商品id")
	private String productId;
	@NotNull(message="起始日期不能为空")
	@ApiModelProperty(example="起始日期(2016-07-06 10:17:48)")
	private Date startTime;
	@NotNull(message="截止日期不能为空")
	@ApiModelProperty(example="截止日期(2016-07-06 10:17:48)")
	private Date endTime;
	@Min(value=1,message="满数量不能小于1")
	@ApiModelProperty(example="满数量")
	private int achieveNum;
	@Min(value=1,message="赠数量不能小于1")
	@ApiModelProperty(example="赠数量")
	private int giftNum;
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getProductId() {
		return productId;
	}
	public void setProductId(String productId) {
		this.productId = productId;
	}
	public Date getStartTime() {
		return startTime;
	}
	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}
	public Date getEndTime() {
		return endTime;
	}
	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}
	public int getAchieveNum() {
		return achieveNum;
	}
	public void setAchieveNum(int achieveNum) {
		this.achieveNum = achieveNum;
	}
	public int getGiftNum() {
		return giftNum;
	}
	public void setGiftNum(int giftNum) {
		this.giftNum = giftNum;
	}
	@Override
	public String toString() {
		return "ChannelDiscountAddDto [name=" + name + ", productId=" + productId + ", startTime=" + startTime
				+ ", endTime=" + endTime + ", achieveNum=" + achieveNum + ", giftNum=" + giftNum + "]";
	}
}
